package com.sport.dao;

import com.sport.bean.Admin;
import com.sport.bean.PageParam;
import com.sport.bean.Teacher;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TeacherDao {
    @Select("select * from teacher")
    //查找所有学生
    List<Teacher> findAll();

    //根据裁判名字查找
    Teacher findByName(String name);

    //更新裁判
    int updateTea(@Param("teacher") Teacher teacher);
    //添加裁判
    int addTeacher(Teacher teacher);
    //删除裁判
    @Delete("DELETE FROM `teachert` WHERE `id` = #{id}")
    int deletTeacher(Integer id);

    //分页
    List<Teacher> listPage(@Param("page") PageParam<Teacher> page);

    //根据ID查找d
    Teacher findById(Integer id);
}
